home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / SmPt / TN.SMPT.007 < prev    next >
Encoding:
Text File  |  1988-12-21  |  4.0 KB  |  79 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. SmartPort
  8. #7:    SmartPort Subtype Codes
  9.  
  10. Written by:    Matt Deatherage                                  November 1988
  11.  
  12. This Technical Note clarifies information about SmartPort subtype codes.
  13. _____________________________________________________________________________
  14.  
  15. Following is a definition of the SmartPort subtype code as given in the Apple 
  16. IIGS Firmware Reference:
  17.  
  18. _________________________________________________
  19. |     |     |     |     |     |     |     |     |
  20. |  7  |  6  |  5  |  4  |  3  |  2  |  1  |  0  |
  21. |     |     |     |     |     |     |     |     |
  22. _________________________________________________
  23.    |     |     |     |     |     |     |     |
  24.    |     |     |     |_____|_____|_____|_____|___ Reserved
  25.    |     |     |_________________________________ 0 = Removable Media
  26.    |     |_______________________________________ 1 = Supports disk-switched
  27.    |                                                  errors
  28.    |_____________________________________________ 1 = Supports Extended
  29.                                                       SmartPort
  30.  
  31.                        Figure 1-SmartPort Subtype Byte
  32.  
  33. Note that the value for subtype is defined for certain characteristics of the 
  34. device; it is not assigned to the device as with Smartport device types (see 
  35. SmartPort Technical Note #4, SmartPort Device Types for a complete list).
  36.  
  37. Attempting to distinguish different kinds of the same device by the subtype 
  38. field can be confusing.  For example, the Apple IIc Plus has an internal 3.5" 
  39. disk drive.  This drive does not support disk-switched errors nor does it 
  40. support Extended SmartPort, and it has removable media.  This combination of 
  41. features gives it a subtype definition of $00.  However, this is the same 
  42. subtype returned for a UniDisk 3.5.  Any program which finds type $01 (3.5" 
  43. Disk) and subtype $00 and assumes the drive is a UniDisk 3.5 will be misled by 
  44. any other 3.5" drive matching the characteristics of the UniDisk 3.5.
  45.  
  46. Some Apple technical manuals state that the subtype byte may be used for 
  47. identification purposes, but this cannot be supported if more than one variety 
  48. of a specific device has the same characteristics and subtype.
  49.  
  50. To determine if a particular device type is the subtype you want, you may 
  51. examine the name returned in the Device Information Block (DIB) from a STATUS 
  52. call with statcode = 3.  For 3.5" drives, however, this is not too helpful 
  53. (both a UniDisk 3.5 and an Apple 3.5 Drive return DISK 3.5).
  54.  
  55. Because the subtype can not conclusively identify different flavors of 3.5" 
  56. drives (and perhaps other individual device types), applications must look 
  57. for errors on device specific calls and respond appropriately.  Typical errors 
  58. returned from making a device-specific call to the wrong device are $21 
  59. (BADCTL) and $22 (BADCTLPARM), although these are not the only ones.  Also 
  60. note that error codes in the range $20 - $2F are duplicated as $60 - $6F, the 
  61. difference being that codes in the latter range are returned if the error was 
  62. a soft error--a non-fatal error returned when the operation is completed 
  63. successfully but an abnormal condition is detected.
  64.  
  65. The Reserved fields in the SmartPort subtype byte are reserved for future 
  66. expansion.  Present peripherals must have them set to zero so that they will 
  67. not appear to support future features which are not presently defined.  For 
  68. this reason, programs checking the status of bits in the subtype byte should 
  69. do so on a bit-by-bit basis only.  For example, if you need to know if a 
  70. device supports Extended Smartport, mask off all bits except bit 7 in the 
  71. subtype byte before doing any comparisons.  Blindly comparing to existing 
  72. common subtype values (like $00 and $C0) will cause comparisons to fail when 
  73. future bits in the subtype byte are defined.
  74.  
  75.  
  76. Further Reference
  77. o    SmartPort Technical Note #4, SmartPort Device Types
  78.  
  79.